package com.xixibaby.logistic.service;

import com.alibaba.fastjson.JSONObject;
import com.xixibaby.logistic.KuaiDi100Kit;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author tomj
 */
public class LogisticQueryServiceImpl implements LogisticQueryService {
    @Autowired
    private KuaiDi100Kit kuaiDi100Kit;
    @Override
    public LogisticQueryResponse logisticQuery(LogisticQueryRequest request) {
        JSONObject query = kuaiDi100Kit.query(request.getCompany(), request.getCode());
        LogisticQueryResponse response = new LogisticQueryResponse();
        response.setResult(query);
        return response;
    }

}
